home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / multlang.zip / FAQ.TXT < prev    next >
Text File  |  1996-06-12  |  5KB  |  48 lines

  1. FAQ about the TMultLang component in Delphi 1.x and 2.x
  2.  
  3. Q.   I am primarly using Delphi 2.0 as my development environment, but I would also like to compile my project in Delphi 1.0 with the TMultLang package. Do I have to make two copies of the project files ?
  4. A    Wether you are working with Delphi 1 or 2 it will be full compability between them. The *.LAN files as well as the internal storage of the TMultLang component are using the same structure, you can therefore use the same code (project files) under each environment. You should be aware that the only difference is that under Delphi 2, huge strings are supported, those will be chopped off at the length of 255 bytes in Delphi 1.
  5.  
  6.  
  7. Q.   I would like to send my translator a textfile which I later would like to use in my application, because the translator does not have Delphi. Can this be done with the TMultLang package ?
  8.  
  9. A.   Yes, you can export and import translations from and to textfiles. However, you will get one textfile per form. A more elegant solution is to compile your application to your EXE file. Give this EXE file to your translator, he would then be able to translate your application at run-time, without source and without Delphi. You can do this by calling the Edit method of the TMultLang component at run-time if you have specified an external (*.LAN) translation file (the LanguageFile property).
  10.  
  11. Q.   When using the TMultLang component with MDI windows, it seems that the childrens merged menus will only be translated to the previous selected language. But this does only seem to happen when I switch language from the Main Form, but not from the children. Is something wrong ?
  12.  
  13. A.   The reason is that Delphi does not update the Main MDI Form menu that is merged from the children directly. This can be worked around by instruct the TMultLang component to translate the children menus before the Main MDI form menu. Put this code in the Main MDI Forms TMultLang component OnTranslate event:
  14. procedure TForm1.MultLang1Translate(Sender: TObject; LanguageName: string);
  15. begin
  16.      if Form2<>nil then Form2.MultLang1.Translate(LanguageName, False);
  17.      if Form3<>nil then Form3.MultLang1.Translate(LanguageName, False);
  18.      .... {continue with each MDI child window}
  19. end;
  20.  
  21. Q.   The Drop Down list for Forms in the Language Editor is always disabled (grayed out), why ?
  22.  
  23. A.   You can only edit other forms in the Language Editor if you are using an external binary file (*.LAN). Make sure you enter a filename (a *.LAN file) in the LanguageFile property of the TMultLang component (the same file for all forms).
  24.  
  25. Q.   I can only Browse properties for the form with the cloud in the Language Editor, am I doing something wrong ?
  26.  
  27. A.   No, it is the limited functions of the TMultLang package. You can only browse properties on the form you called the Language Editor from (the one with the cloud). You should define which properties you need to translate once at design-time from the Langauge Editor from each form. These can later be translated from any other form if you are using an external file (*.lan).
  28.  
  29. Q.   How do I change the User defined string variables for the Design Language since I cannot click on the 'Browse' button from the Language Editor when the design language is selected.
  30.  
  31. A.   When you add User defined strings in any other language than the design language, you will automatically get User Defined strings properties inserted in the MultLang component of the design language. Just select the design time language in the Language Editor, you can then select the MultLang component from the Property translation list which then contains  newly added user defined strings from other languages.
  32.  
  33. Q.   I am using Delphi 2 and I have problems getting the TMultLang component translate the TTabbedNotebook pages. Everything else is translated but the Pages, is this a bug ?
  34.  
  35. A.   The TTabbedNotebook is only included for compability reasons in 32 bit Delphi, use the TPageControl instead. The TTabbedNotebook component do have problems setting the Page Caption strings and can therefore cause Memory Access violations. We have turned off the translation of this control under Delphi 2 since you should use the TPageControl instead.
  36.  
  37. Q.   The TDBNavigators Hints does not change language, but other controls do, during run-time. I need to use the Hints of the TDBNavigator, is there any workaround for this problem.
  38.  
  39. A.   Yes, the hints in that control is stored in an internal list. This list is not automatically updated unless the private InitHints method is called of the TDBNavigator. This can be done by including this code in the OnTranslated event of the TMultLang component.
  40.   var NewHints: TStringList;
  41.   begin
  42.     NewHints := TStringList.Create;
  43.     NewHints.Assign(DBNavigator1.Hints);
  44.     DBNavigator1.Hints:=NewHints; {Will make a call to the private InitHints mehtod}
  45.   end;
  46.  
  47.  
  48.